<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../WEB-INF/templates/loginTemplate.xhtml">
    <ui:define name="content" >
        <f:event listener="#{sessionControllerBean.loadParametersSession()}" type="preRenderView" />
        <h:form id="loginform">
            <fieldset>
                <legend>#{title['authentication.title.login']}</legend>
                <table>
                    <thead>
                        
                    </thead>
                    <tbody>
                        <tr>
                            <td><label for="username" />#{label['authentication.label.username']}</td>
                            <td><p:inputText id="username" placeholder="#{info['authentication.info.usernameplaceholder']}" value="#{userLoginBean.user.sessionUser}" /></td>
                        </tr>
                        <tr>
                            <td><label for="userpassword"/>#{label['authentication.label.userpassword']}</td>
                            <td><p:password id="userpassword" placeholder="#{info['authentication.info.userpasswordplaceholder']}" value="#{userLoginBean.user.userPassword}" ></p:password></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td><h:commandButton id="loginbutton" value="iniciar sesion"  action="#{userLoginBean.authenticate}" ></h:commandButton></td>
                        </tr>
                    </tbody>
                </table>
            </fieldset>
            
        </h:form>
    </ui:define>
</ui:composition>